import Footer from '../components/footer/index.vue'

// #region 自动导入模块路由
// const files = require.context('./modules', false, /\.js$/)
// const modules = []

// files.keys().forEach((key) => {
//   modules.push(files(key).default || files(key))
// })

const routes = [{
  path: '/',
  name: 'footerMain',
  redirect: '/home',
  component: Footer,
  children: [{
    path: 'home',
    name: 'home',
    meta: {
      title: '主页'
    },
    component: () => import('../views/home/index.vue')
  }, {
    path: 'activity',
    name: 'activity',
    meta: {
      title: '活动'
    },
    component: () => import('../views/activity/index.vue')
  }, {
    path: 'city',
    name: 'city',
    meta: {
      title: '同城'
    },
    component: () => import('../views/city/index.vue')
  }, {
    path: 'mine',
    name: 'mine',
    meta: {
      title: '我的'
    },
    component: () => import('../views/mine/index.vue')
  }]
}, {
  path: '/login',
  name: 'login',
  meta: {
    title: '登录',
    isOpen: true
  },
  component: () => import('../views/login/index.vue')
}]
export default routes
